Software developers search code samples stored in a code repository in order to learn the usage of a particular programming interface, or perform refactoring tasks. Code search is normally performed using a search function of a software development tool (e.g., Eclipse®), or a source code search engine such as OpenGrok®. These search tools allow searching for language-specific syntactic elements such as method names or variable types. For example, using OpenGrok, software developers can search for Java class definitions, or locate the references of a particular symbol via symbol search. In Eclipse, pattern matching using regular expressions may also be supported. However, these search tools are mostly text-based, and mainly provide specific interpretations to certain syntactic elements. Even though some of the code search tasks can be performed using these text-based source code search engines, the software developers may be more interested in the syntactic patterns in the code samples, which cannot be easily discovered by these conventional search tools.